package com.wsd.domain;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import java.math.BigDecimal;

/**
 * @author Wan Yucan
 * @date 2020/7/20-16:56
 */
@Component
@Scope("prototype")
public class LoanDetails {
    /**
     * 贷款ID
     */
    private long loanId;
    /**
     * 客户ID
     */
    private long customerId;
    /**
     * 贷款总额
     */
    private BigDecimal loanAmount;
    /**
     * 贷款总利息
     */
    private BigDecimal loanInterest;
    /**
     * 分期数
     */
    private int installmentNum;
    /**
     * 还款方式
     */
    private char repaymentType;
    /**
     * 已还本金
     */
    private BigDecimal returnPrincipal;
    /**
     * 使用中本金
     */
    private BigDecimal usedPrincipal;
    /**
     * 已还利息
     */
    private BigDecimal returnInterest;
    /*
    逾期利息
     */
    private BigDecimal overdueInterest;

    public long getLoanId() {
        return loanId;
    }

    public void setLoanId(long loanId) {
        this.loanId = loanId;
    }

    public long getCustomerId() {
        return customerId;
    }

    public void setCustomerId(long customerId) {
        this.customerId = customerId;
    }

    public BigDecimal getLoanAmount() {
        return loanAmount;
    }

    public void setLoanAmount(BigDecimal loanAmount) {
        this.loanAmount = loanAmount;
    }

    public BigDecimal getLoanInterest() {
        return loanInterest;
    }

    public void setLoanInterest(BigDecimal loanInterest) {
        this.loanInterest = loanInterest;
    }

    public int getInstallmentNum() {
        return installmentNum;
    }

    public void setInstallmentNum(int installmentNum) {
        this.installmentNum = installmentNum;
    }

    public char getRepaymentType() {
        return repaymentType;
    }

    public void setRepaymentType(char repaymentType) {
        this.repaymentType = repaymentType;
    }

    public BigDecimal getReturnPrincipal() {
        return returnPrincipal;
    }

    public void setReturnPrincipal(BigDecimal returnPrincipal) {
        this.returnPrincipal = returnPrincipal;
    }

    public BigDecimal getUsedPrincipal() {
        return usedPrincipal;
    }

    public void setUsedPrincipal(BigDecimal usedPrincipal) {
        this.usedPrincipal = usedPrincipal;
    }

    public BigDecimal getReturnInterest() {
        return returnInterest;
    }

    public void setReturnInterest(BigDecimal returnInterest) {
        this.returnInterest = returnInterest;
    }

    public BigDecimal getOverdueInterest() {
        return overdueInterest;
    }

    public void setOverdueInterest(BigDecimal overdueInterest) {
        this.overdueInterest = overdueInterest;
    }

    @Override
    public String toString() {
        return "LoanDetails{" +
                "loanId=" + loanId +
                ", customerId=" + customerId +
                ", loanAmount=" + loanAmount +
                ", loanInterest=" + loanInterest +
                ", installmentNum=" + installmentNum +
                ", repaymentType=" + repaymentType +
                ", returnPrincipal=" + returnPrincipal +
                ", usedPrincipal=" + usedPrincipal +
                ", returnInterest=" + returnInterest +
                ", overdueInterest=" + overdueInterest +
                '}';
    }
}
